.class public Llt/noframe/gpsfarmguide/undo/Originator;
.super Ljava/lang/Object;
.source "Originator.java"


# instance fields
.field private state:Ljava/util/List;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/List<",
            "Lcom/google/android/gms/maps/model/LatLng;",
            ">;"
        }
    .end annotation
.end field


# direct methods
.method public constructor <init>()V
    .locals 0

    .line 9
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method


# virtual methods
.method public getState()Ljava/util/List;
    .locals 1
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "()",
            "Ljava/util/List<",
            "Lcom/google/android/gms/maps/model/LatLng;",
            ">;"
        }
    .end annotation

    .line 19
    iget-object v0, p0, Llt/noframe/gpsfarmguide/undo/Originator;->state:Ljava/util/List;

    return-object v0
.end method

.method public restoreFromMemento(Llt/noframe/gpsfarmguide/undo/AbstractMemento;)V
    .locals 0

    .line 26
    invoke-virtual {p1}, Llt/noframe/gpsfarmguide/undo/AbstractMemento;->getSavedState()Ljava/util/List;

    move-result-object p1

    iput-object p1, p0, Llt/noframe/gpsfarmguide/undo/Originator;->state:Ljava/util/List;

    return-void
.end method

.method public saveToMemento()Llt/noframe/gpsfarmguide/undo/Memento;
    .locals 2

    .line 23
    new-instance v0, Llt/noframe/gpsfarmguide/undo/Memento;

    iget-object v1, p0, Llt/noframe/gpsfarmguide/undo/Originator;->state:Ljava/util/List;

    invoke-direct {v0, v1}, Llt/noframe/gpsfarmguide/undo/Memento;-><init>(Ljava/util/List;)V

    return-object v0
.end method

.method public setState(Ljava/util/List;)V
    .locals 2
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/util/List<",
            "Lcom/google/android/gms/maps/model/LatLng;",
            ">;)V"
        }
    .end annotation

    .line 13
    new-instance v0, Ljava/util/ArrayList;

    invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V

    iput-object v0, p0, Llt/noframe/gpsfarmguide/undo/Originator;->state:Ljava/util/List;

    .line 14
    invoke-interface {p1}, Ljava/util/List;->iterator()Ljava/util/Iterator;

    move-result-object p1

    :goto_0
    invoke-interface {p1}, Ljava/util/Iterator;->hasNext()Z

    move-result v0

    if-eqz v0, :cond_0

    invoke-interface {p1}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/google/android/gms/maps/model/LatLng;

    .line 15
    iget-object v1, p0, Llt/noframe/gpsfarmguide/undo/Originator;->state:Ljava/util/List;

    invoke-interface {v1, v0}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    goto :goto_0

    :cond_0
    return-void
.end method
